Array
(
    [0] => Array
        (
            [taid] => 88
            [taname] => 尺码
            [tavalue] => S,M,L,XL,XXL,XXXL,XXXXL
            [class] => 1
            [type_tid] => 16
            [gtid] => 56
            [gtvalue] => XL
            [added] => 3
            [type_taid] => 88
            [gid] => 3
        )

    [1] => Array
        (
            [taid] => 88
            [taname] => 尺码
            [tavalue] => S,M,L,XL,XXL,XXXL,XXXXL
            [class] => 1
            [type_tid] => 16
            [gtid] => 55
            [gtvalue] => M
            [added] => 6
            [type_taid] => 88
            [gid] => 3
        )

    [2] => Array
        (
            [taid] => 88
            [taname] => 尺码
            [tavalue] => S,M,L,XL,XXL,XXXL,XXXXL
            [class] => 1
            [type_tid] => 16
            [gtid] => 54
            [gtvalue] => L
            [added] => 5
            [type_taid] => 88
            [gid] => 3
        )

    [3] => Array
        (
            [taid] => 96
            [taname] => 颜色
            [tavalue] => 红色,白色,绿色,黑色
            [class] => 1
            [type_tid] => 16
            [gtid] => 57
            [gtvalue] => 白色
            [added] => 2
            [type_taid] => 96
            [gid] => 3
        )

    [4] => Array
        (
            [taid] => 96
            [taname] => 颜色
            [tavalue] => 红色,白色,绿色,黑色
            [class] => 1
            [type_tid] => 16
            [gtid] => 58
            [gtvalue] => 红色
            [added] => 6
            [type_taid] => 96
            [gid] => 3
        )

    [5] => Array
        (
            [taid] => 96
            [taname] => 颜色
            [tavalue] => 红色,白色,绿色,黑色
            [class] => 1
            [type_tid] => 16
            [gtid] => 59
            [gtvalue] => 绿色
            [added] => 4
            [type_taid] => 96
            [gid] => 3
        )

    [6] => Array
        (
            [taid] => 97
            [taname] => 身高
            [tavalue] => 178,179,23,21,33
            [class] => 1
            [type_tid] => 16
            [gtid] => 60
            [gtvalue] => 179
            [added] => 3
            [type_taid] => 97
            [gid] => 3
        )

    [7] => Array
        (
            [taid] => 97
            [taname] => 身高
            [tavalue] => 178,179,23,21,33
            [class] => 1
            [type_tid] => 16
            [gtid] => 61
            [gtvalue] => 178
            [added] => 6
            [type_taid] => 97
            [gid] => 3
        )

    [8] => Array
        (
            [taid] => 97
            [taname] => 身高
            [tavalue] => 178,179,23,21,33
            [class] => 1
            [type_tid] => 16
            [gtid] => 62
            [gtvalue] => 23
            [added] => 2
            [type_taid] => 97
            [gid] => 3
        )

)




将数据进行整合$newData
Array
(
    [尺码] => Array
        (
            [56] => XL
            [55] => M
            [54] => L
        )

    [颜色] => Array
        (
            [57] => 白色
            [58] => 红色
            [59] => 绿色
        )

    [身高] => Array
        (
            [60] => 179
            [61] => 178
            [62] => 23
        )

)

商品数据库得到的相等gid的数据
Array
(
    [0] => Array
        (
            [glid] => 4
            [combine] => 55,57,60
            [number] => 33
            [inventory] => 44
            [gid] => 3
        )

    [1] => Array
        (
            [glid] => 5
            [combine] => 56,57,60
            [number] => 
            [inventory] => 44
            [gid] => 3
        )

    [2] => Array
        (
            [glid] => 6
            [combine] => 56,57,60
            [number] => 44
            [inventory] => 55
            [gid] => 3
        )

    [3] => Array
        (
            [glid] => 7
            [combine] => 56,57,60
            [number] => 444
            [inventory] => 55
            [gid] => 3
        )

    [4] => Array
        (
            [glid] => 8
            [combine] => 56,57,61
            [number] => 44
            [inventory] => 55
            [gid] => 3
        )

)